package com.aaa.system.controller;

import com.aaa.entity.Menu;
import com.aaa.system.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: aaa-his-parent
 * @description:
 * @author: 闫克起2
 * @create: 2023-12-07 12:09
 **/
@RestController
@RequestMapping("system/menu")
public class MenuController {

    @Autowired
    private MenuService menuService;

    @GetMapping("/findMenusByUserId/{id}")
    public List<Menu> findMenusByUserId(@PathVariable Long id){
        List<Menu> menus = menuService.findMenusByUserId(id);
        return menus;
    }
}
